Skip to content

[spi_host] Low-level SD card support#446

Draft
elliotb-lowrisc wants to merge 2 commits intolowRISC:mainfrom
elliotb-lowrisc:spi_sd
Draft

[spi_host] Low-level SD card support#446
elliotb-lowrisc wants to merge 2 commits intolowRISC:mainfrom
elliotb-lowrisc:spi_sd

Conversation

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

@elliotb-lowrisc elliotb-lowrisc commented Apr 17, 2026

Replace the initial SPI Host loopback connections with connections to the microSD card slot for Genesys2 and an SD card model for Verilator. This includes allocating a GPI pin for card presence detection and a GPO pin for SD card reset (power supply switching).

Also output the SPI Host signals on an otherwise unused Genesys2 PMOD header for easier debugging using a logic analyser.

Add SD card and minimal filesystem helpers for SPI Host, and some tests. These have been ported from sonata-system, which required changes for the different spi_host hardware and translating from C++ to C.

Only a subset of the tests will run in Verilator unless an SD card image is provided.

Replace the initial SPI Host loopback connections with connections to
the microSD card slot for Genesys2 and an SD card model for Verilator.
This includes allocating a GPI pin for card presence detection
and a GPO pin for SD card reset (power supply switching).

Also output the SPI Host signals on an otherwise unused Genesys2
PMOD header for easier debugging using a logic analyser.
Add SD card and minimal filesystem helpers for SPI Host, and some tests.
These have been ported from sonata-system, which required changes for
the different spi_host hardware and translating from C++ to C.

Only a subset of the tests will run in Verilator unless an SD card image
is provided.
@elliotb-lowrisc elliotb-lowrisc changed the title [spi_host] Switch from loopback to SD card access [spi_host] Low-level SD card support May 7, 2026
@elliotb-lowrisc elliotb-lowrisc linked an issue May 7, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge SD card HW/SW changes to Mocha [hw] SPI host SD card integration

1 participant